package io.geekidea.boot.warehouse.controller;

import io.geekidea.boot.framework.response.ApiResult;
import io.geekidea.boot.warehouse.entity.Warehouse;
import io.geekidea.boot.warehouse.service.WarehouseService;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import javax.annotation.Resource;
import java.util.List;

@Slf4j
@RestController
@RequestMapping("/warehouse")
@Tag(name = "物料仓库管理")
public class WarehouseController {

    @Resource
    private WarehouseService warehouseService;

    @PostMapping("/list")
    @Operation(summary = "查询物料仓库所有数据")
    public ApiResult warehouseList(){
      List<Warehouse> warehouseList = warehouseService.list();
       return ApiResult.success(warehouseList);
    }
}
